package com.edu.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class MyController {

    @RequestMapping("/test01")
    public String test01(){
        System.out.println("执行了test01");
        String str = null;
        System.out.println(str.length());
        return "/index.jsp";
    }

    @RequestMapping("/test02")
    public String test02(Model model){
        System.out.println("执行了test02");
        model.addAttribute("msg","hello world");
        return "/index.jsp";
    }
}
